<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../common/common_java.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@include file="../common/common_meta.jsp" %>  
    <meta name="keywords" content="投票,投票网,大众,民意,调查,<c:forEach items='${voteLabelList}' var='curVoteLabel4Key'>${curVoteLabel4Key.tLabel.name},</c:forEach>">
	<link rel="stylesheet" type="text/css" href="${cssBase}/common/skillbar.css"/>
	<%@include file="../common/common_css.jsp"%>
    <title>${fn:escapeXml(vote.title)}-大众投票</title>
</head>
<body>
   <jsp:include page="../common/common_header.jsp">
		<jsp:param name="active" value="vote_user"/>
	</jsp:include>
    <section class="container">
        <h3 class="mt-10">${fn:escapeXml(vote.title)}</h3>
        <div class="line"></div>
        <div class="responsive">
            <div class="row cl">
                <div class="col-md-10 col-md-offset-1">
                    <div class="line"></div>
                	 <%@include file="../vote/voteItem.jsp" %>  
                     <!-- left down1 -->
                    <div class="line"></div>
                    <div class="responsive">
                        <div class="row cl" role="grid">
                            <div class="col-xs-12">
                                <div class="panel shadow panel-default mt-20 radius ">
                                    <div class="panel-body ">
                                        <div class="f-18">
                                            <h4><b>评论</b></h4>
                                            <div class="line mt-10 mb-10"></div>
				                            <form  method="post" class="form form-horizontal responsive" id="commentForm">
				                                <div class="row cl">
				                                    <div class="col-md-12">
				                                		<div class="c-danger"></div>
				                                		<input  type="hidden" value="${vote.id}" name="voteId" />
				                                        <textarea name="content" cols="" rows="" class="textarea" placeholder="请输入您的评论……" datatype="*10-500" nullmsg="评论不能为空！" errMsg="最少输入10个字符" onKeyUp="textarealength(this,500)"></textarea>
				                                        <p class="textarea-numberbar"><em class="textarea-length">0</em>/500</p>
				                                    </div>
				                                </div>
				                                <div class="row cl">
				                                    <div class="col-md-12">
				                                        <input class="btn btn-primary f-r" type="submit"  id="commentBtn" value="&nbsp;&nbsp;发表评论&nbsp;&nbsp;" >
				                                    </div>
				                                </div>
				                            </form>
                                            <div class="line mt-10 "></div>
			                                <div class="row cl">
			                                    <div class="col-md-12" id="commentList">
			                                     	<c:forEach items="${commentPage.content}" var="comment">
														<div class="panel panel-default mt-10">  
															<div class="panel-header">${comment.userName} 评论于 <fmt:formatDate value="${comment.createTime}" pattern="yyyy-MM-dd HH:mm:ss" /></div> 
															<div class="panel-body">${fn:escapeXml(comment.content)}</div> 
														</div> 
				                                    </c:forEach>
			                                    </div>
			                                    <div class="mt-10 text-r" data-vote-id="${vote.id}" data-totalPages='${commentPage.totalPages}' id="pageCont"></div>
			                                </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- right 相关功能暂时不启用 -->
                <%-- 
	                <div class="col-md-3">
	                    <div class="panel shadow panel-default radius mt-20">
	                        <div class="panel-header">相关</div>
	                        <div class="panel-body">
	                            <ol class="top-list">
	                           		 <c:forEach items="${relativeVoteList}" var="relativeVote" varStatus="status">
		                                <li <c:if test="${status.index<3}"> class="top" </c:if> ><em>${status.index+1}</em><a data-id="${relativeVote.id}" href="${ctx}/vote/show/${relativeVote.id}" target="_blank">${relativeVote.title}</a><span class="date">${relativeVote.voteNum}</span></li>
	                                </c:forEach>
	                            </ol>
	                        </div>
	                    </div>
	                </div>
                --%>
            </div>
        </div>
    </section>
	<%@include file="../common/common_footer.jsp" %> 
	<%@include file="../common/common_js.jsp" %>
	<script type="text/javascript" src="${jsBase}/vote/show.js" ></script>
	<script type="text/javascript" src="${jsBase}/common/fallspage.js" ></script>
	<script type="text/javascript" src="${jsBase}/common/skillbar.js" ></script>
	
</body>
</html>